<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
<script type="text/javascript">
function validate() {
    if(document.frm.username.value=="")
    {
    	document.getElementById("mes1").setAttribute("style", "display: table");
    	document.getElementById("user").setAttribute("style", "color: red")
      document.frm.username.focus();
      return false;
    }
    if(document.frm.password.value=="")
    {
      alert("Password should be left blank");
      document.frm.password.focus();
      return false;
    }
    return true;
}</script>
</head>
<body>
	<h1>
		
	</h1>
	<form name="frm" method="POST" action="loginexcute" onsubmit="return validate()">
		<table>
			<tr>
				<td id="mes1" style="display: none" >Please enter Username</td>
				<td id="user">User</td>
				<td><input type="text" name="username" size="30"></td>
			</tr>
			<tr>
				<td>Pass</td>
				<td><input type="password" name="password" size="30"></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit"
					name="submit" id="submit" value="Login" height="15px"
					style="border-radius: 5px 5px 5px 5px; background: blue; color: white;" />
				</td>
			</tr>
		</table>
	</form>

</body>
</html>